{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# W3_冯炳驹_124298228"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 第五步_1：调整正则化参数：reg_alpha 和reg_lambda"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "#导入库\n",
    "from xgboost import XGBClassifier\n",
    "import xgboost as xgb\n",
    "\n",
    "import pandas as pd \n",
    "import numpy as np\n",
    "\n",
    "from sklearn.model_selection import GridSearchCV\n",
    "from sklearn.model_selection import StratifiedKFold\n",
    "\n",
    "from sklearn.metrics import log_loss\n",
    "\n",
    "from matplotlib import pyplot\n",
    "import seaborn as sns\n",
    "%matplotlib inline"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>bathrooms</th>\n",
       "      <th>bedrooms</th>\n",
       "      <th>price</th>\n",
       "      <th>price_bathrooms</th>\n",
       "      <th>price_bedrooms</th>\n",
       "      <th>room_diff</th>\n",
       "      <th>room_num</th>\n",
       "      <th>Year</th>\n",
       "      <th>Month</th>\n",
       "      <th>Day</th>\n",
       "      <th>...</th>\n",
       "      <th>walk</th>\n",
       "      <th>walls</th>\n",
       "      <th>war</th>\n",
       "      <th>washer</th>\n",
       "      <th>water</th>\n",
       "      <th>wheelchair</th>\n",
       "      <th>wifi</th>\n",
       "      <th>windows</th>\n",
       "      <th>work</th>\n",
       "      <th>interest_level</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>1.5</td>\n",
       "      <td>3</td>\n",
       "      <td>3000</td>\n",
       "      <td>1200.0</td>\n",
       "      <td>750.000000</td>\n",
       "      <td>-1.5</td>\n",
       "      <td>4.5</td>\n",
       "      <td>2016</td>\n",
       "      <td>6</td>\n",
       "      <td>24</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>1.0</td>\n",
       "      <td>2</td>\n",
       "      <td>5465</td>\n",
       "      <td>2732.5</td>\n",
       "      <td>1821.666667</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>2016</td>\n",
       "      <td>6</td>\n",
       "      <td>12</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>1.0</td>\n",
       "      <td>1</td>\n",
       "      <td>2850</td>\n",
       "      <td>1425.0</td>\n",
       "      <td>1425.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>2016</td>\n",
       "      <td>4</td>\n",
       "      <td>17</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>1.0</td>\n",
       "      <td>1</td>\n",
       "      <td>3275</td>\n",
       "      <td>1637.5</td>\n",
       "      <td>1637.500000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>2016</td>\n",
       "      <td>4</td>\n",
       "      <td>18</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>1.0</td>\n",
       "      <td>4</td>\n",
       "      <td>3350</td>\n",
       "      <td>1675.0</td>\n",
       "      <td>670.000000</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>5.0</td>\n",
       "      <td>2016</td>\n",
       "      <td>4</td>\n",
       "      <td>28</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>5 rows × 228 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "   bathrooms  bedrooms  price  price_bathrooms  price_bedrooms  room_diff  \\\n",
       "0        1.5         3   3000           1200.0      750.000000       -1.5   \n",
       "1        1.0         2   5465           2732.5     1821.666667       -1.0   \n",
       "2        1.0         1   2850           1425.0     1425.000000        0.0   \n",
       "3        1.0         1   3275           1637.5     1637.500000        0.0   \n",
       "4        1.0         4   3350           1675.0      670.000000       -3.0   \n",
       "\n",
       "   room_num  Year  Month  Day       ...        walk  walls  war  washer  \\\n",
       "0       4.5  2016      6   24       ...           0      0    0       0   \n",
       "1       3.0  2016      6   12       ...           0      0    0       0   \n",
       "2       2.0  2016      4   17       ...           0      0    0       0   \n",
       "3       2.0  2016      4   18       ...           0      0    0       0   \n",
       "4       5.0  2016      4   28       ...           0      0    1       0   \n",
       "\n",
       "   water  wheelchair  wifi  windows  work  interest_level  \n",
       "0      0           0     0        0     0               1  \n",
       "1      0           0     0        0     0               2  \n",
       "2      0           0     0        0     0               0  \n",
       "3      0           0     0        0     0               2  \n",
       "4      0           0     0        0     0               2  \n",
       "\n",
       "[5 rows x 228 columns]"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# path to where the data lies\n",
    "dpath = './data/'\n",
    "train = pd.read_csv(dpath +\"RentListingInquries_FE_train.csv\")\n",
    "train.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAY4AAAEFCAYAAAD0cwBnAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAGmhJREFUeJzt3XuUXWWd5vFvpRJyIZV0jRQyjiCGdh6ZFjQGSGySMUIU\nwQtqd9vKZdHShkvTRLvphpYkKq6wWKLBTnBMnEAgELRZRhA7DhBahFymCRC5JAv8CRkv9IzaJeRS\nGJIQcuaPdx9zOqTO2ZvUqXNOneezVhZnv+fdu36brFVP3v3u/e6OUqmEmZlZXsMaXYCZmbUWB4eZ\nmRXi4DAzs0IcHGZmVoiDw8zMChne6ALqrbe3z7eNmZkV1NPT1dHfdx5xmJlZIQ4OMzMrxMFhZmaF\n1G2OQ1InsAQQUAIuAkYAK4Fnsm6LIuJ2STOBC4E9wLyIWClpNLAcOBzoA86LiF5JU4AFWd9VEXFV\nvc7BzMxerZ4jjg8BRMTJwBzgamAScF1ETM/+3C7pCGAWcDJwGnCNpJHAxcDGiJgG3JIdA2AxcBYw\nFZgsaWIdz8HMzPZTtxFHRHxP0sps803AVlJwSNKZpFHHZ4GTgHURsQvYJelZ4HhSMFyb7X83MFfS\nOGBkRGwmHeheYAbwWH91dH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pcAUSU8CtwPnRkQfaVXVmyVtIM03fCHr\nfxfwhKQ8r5FdDDwDPAY8CtwUEQ8ARMQ6YDywvKL/2cCns1quAf48IryyqR0Ur45rZmaFeI7DrElk\nDwJ2H+CrxRGxeLDrMeuPRxxmZlaI5zjMzKwQB4eZmRXi4DAzs0IcHGZmVoiDw8zMCvn/IYm+TmHe\nrR4AAAAASUVORK5CYII=\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x2137379aba8>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "sns.countplot(train.interest_level);\n",
    "pyplot.xlabel('interest_level');\n",
    "pyplot.ylabel('Number of occurrences');"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "# drop ids and get labels\n",
    "y_train = train['interest_level']\n",
    "\n",
    "train = train.drop([\"interest_level\"], axis=1)\n",
    "X_train = np.array(train)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "# prepare cross validation\n",
    "kfold = StratifiedKFold(n_splits=5, shuffle=True, random_state=3)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "#直接调用xgboost内嵌的交叉验证（cv），可对连续的n_estimators参数进行快速交叉验证\n",
    "#而GridSearchCV只能对有限个参数进行交叉验证\n",
    "def modelfit(alg, X_train, y_train, cv_folds=None, early_stopping_rounds=10):\n",
    "    xgb_param = alg.get_xgb_params()\n",
    "    xgb_param['num_class'] = 9\n",
    "    \n",
    "    #直接调用xgboost，而非sklarn的wrapper类\n",
    "    xgtrain = xgb.DMatrix(X_train, label = y_train)\n",
    "        \n",
    "    cvresult = xgb.cv(xgb_param, xgtrain, num_boost_round=alg.get_params()['n_estimators'], folds =cv_folds,\n",
    "             metrics='mlogloss', early_stopping_rounds=early_stopping_rounds)\n",
    "  \n",
    "    cvresult.to_csv('1_nestimators.csv', index_label = 'n_estimators')\n",
    "    \n",
    "    #最佳参数n_estimators\n",
    "    n_estimators = cvresult.shape[0]\n",
    "    print(\"best n_estimators: %i\" %(n_estimators))\n",
    "    \n",
    "    # 采用交叉验证得到的最佳参数n_estimators，训练模型\n",
    "    alg.set_params(n_estimators = n_estimators)\n",
    "    alg.fit(X_train, y_train, eval_metric='mlogloss')\n",
    "        \n",
    "    #Predict training set:\n",
    "    #train_predprob = alg.predict_proba(X_train)\n",
    "    #logloss = log_loss(y_train, train_predprob)\n",
    "\n",
    "   #Print model report:\n",
    "   # print (\"logloss of train :\" )\n",
    "   # print logloss"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'reg_alpha': [1e-05, 0.01, 0.1, 1, 100], 'reg_lambda': [0.5, 1, 2, 10, 100]}"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "reg_alpha = [1e-5, 1e-2, 0.1, 1, 100]    #default = 0, 测试0.1,1，1.5，2\n",
    "reg_lambda = [0.5, 1, 2, 10, 100]      #default = 1，测试0.1， 0.5， 1，2\n",
    "\n",
    "param_test5_1 = dict(reg_alpha=reg_alpha, reg_lambda=reg_lambda)\n",
    "param_test5_1"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "GridSearchCV(cv=StratifiedKFold(n_splits=5, random_state=3, shuffle=True),\n",
       "       error_score='raise',\n",
       "       estimator=XGBClassifier(base_score=0.5, booster='gbtree', colsample_bylevel=0.7,\n",
       "       colsample_bytree=0.8, gamma=0, learning_rate=0.1, max_delta_step=0,\n",
       "       max_depth=6, min_child_weight=0.5, missing=None, n_estimators=192,\n",
       "       n_jobs=1, nthread=4, objective='multi:softprob', random_state=0,\n",
       "       reg_alpha=0, reg_lambda=1, scale_pos_weight=1, seed=3, silent=True,\n",
       "       subsample=0.8),\n",
       "       fit_params={}, iid=True, n_jobs=3,\n",
       "       param_grid={'reg_lambda': [0.5, 1, 2, 10, 100], 'reg_alpha': [1e-05, 0.01, 0.1, 1, 100]},\n",
       "       pre_dispatch='2*n_jobs', refit=True, return_train_score=True,\n",
       "       scoring='neg_log_loss', verbose=0)"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "xgb5_1 = XGBClassifier(\n",
    "        learning_rate =0.1,\n",
    "        n_estimators=192,  #第一轮参数调整得到的n_estimators最优值\n",
    "        max_depth=6,\n",
    "        min_child_weight=0.5,\n",
    "        gamma=0,\n",
    "        subsample=0.8,\n",
    "        colsample_bytree=0.8,\n",
    "        colsample_bylevel = 0.7,\n",
    "        objective= 'multi:softprob',\n",
    "        nthread=4,\n",
    "        seed=3)\n",
    "\n",
    "\n",
    "gsearch5_1 = GridSearchCV(xgb5_1, param_grid = param_test5_1, scoring='neg_log_loss',n_jobs=3, cv=kfold)\n",
    "gsearch5_1.fit(X_train , y_train)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "C:\\Anaconda2\\envs\\python3\\lib\\site-packages\\sklearn\\model_selection\\_search.py:667: DeprecationWarning: The grid_scores_ attribute was deprecated in version 0.18 in favor of the more elaborate cv_results_ attribute. The grid_scores_ attribute will not be available from 0.20\n",
      "  DeprecationWarning)\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "([mean: -0.57996, std: 0.00190, params: {'reg_alpha': 1e-05, 'reg_lambda': 0.5},\n",
       "  mean: -0.58016, std: 0.00178, params: {'reg_lambda': 1, 'reg_alpha': 1e-05},\n",
       "  mean: -0.58014, std: 0.00203, params: {'reg_alpha': 1e-05, 'reg_lambda': 2},\n",
       "  mean: -0.58092, std: 0.00189, params: {'reg_lambda': 10, 'reg_alpha': 1e-05},\n",
       "  mean: -0.58552, std: 0.00209, params: {'reg_alpha': 1e-05, 'reg_lambda': 100},\n",
       "  mean: -0.57972, std: 0.00173, params: {'reg_alpha': 0.01, 'reg_lambda': 0.5},\n",
       "  mean: -0.58012, std: 0.00127, params: {'reg_lambda': 1, 'reg_alpha': 0.01},\n",
       "  mean: -0.58024, std: 0.00205, params: {'reg_alpha': 0.01, 'reg_lambda': 2},\n",
       "  mean: -0.58055, std: 0.00229, params: {'reg_alpha': 0.01, 'reg_lambda': 10},\n",
       "  mean: -0.58578, std: 0.00213, params: {'reg_lambda': 100, 'reg_alpha': 0.01},\n",
       "  mean: -0.57955, std: 0.00219, params: {'reg_alpha': 0.1, 'reg_lambda': 0.5},\n",
       "  mean: -0.57958, std: 0.00230, params: {'reg_alpha': 0.1, 'reg_lambda': 1},\n",
       "  mean: -0.57926, std: 0.00152, params: {'reg_lambda': 2, 'reg_alpha': 0.1},\n",
       "  mean: -0.58035, std: 0.00208, params: {'reg_alpha': 0.1, 'reg_lambda': 10},\n",
       "  mean: -0.58560, std: 0.00202, params: {'reg_alpha': 0.1, 'reg_lambda': 100},\n",
       "  mean: -0.57952, std: 0.00213, params: {'reg_lambda': 0.5, 'reg_alpha': 1},\n",
       "  mean: -0.57975, std: 0.00158, params: {'reg_lambda': 1, 'reg_alpha': 1},\n",
       "  mean: -0.57919, std: 0.00240, params: {'reg_alpha': 1, 'reg_lambda': 2},\n",
       "  mean: -0.58038, std: 0.00236, params: {'reg_alpha': 1, 'reg_lambda': 10},\n",
       "  mean: -0.58601, std: 0.00178, params: {'reg_lambda': 100, 'reg_alpha': 1},\n",
       "  mean: -0.61691, std: 0.00147, params: {'reg_alpha': 100, 'reg_lambda': 0.5},\n",
       "  mean: -0.61688, std: 0.00159, params: {'reg_lambda': 1, 'reg_alpha': 100},\n",
       "  mean: -0.61728, std: 0.00131, params: {'reg_alpha': 100, 'reg_lambda': 2},\n",
       "  mean: -0.61710, std: 0.00121, params: {'reg_lambda': 10, 'reg_alpha': 100},\n",
       "  mean: -0.61792, std: 0.00132, params: {'reg_alpha': 100, 'reg_lambda': 100}],\n",
       " {'reg_alpha': 1, 'reg_lambda': 2},\n",
       " -0.5791869533152022)"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "gsearch5_1.grid_scores_, gsearch5_1.best_params_,     gsearch5_1.best_score_"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'mean_fit_time': array([ 215.65767446,  209.91945443,  869.08444109,  116.39808459,\n",
       "         130.42280407,  142.50658545,  157.03661728,  133.26001754,\n",
       "         130.5485044 ,  113.78476138,  117.90880594,  110.34232349,\n",
       "         115.64663363,  115.94663186,  116.05652418,  109.73892097,\n",
       "         106.87349615,  114.58982248,  112.79375019,  111.51424232,\n",
       "          95.25118208,   92.81409607,   95.43747506,   97.41974797,\n",
       "          88.27883224]),\n",
       " 'mean_score_time': array([ 1.23047261,  1.37706356,  0.94130411,  0.71149459,  0.90380473,\n",
       "         0.96140981,  1.08048701,  0.78193159,  0.84694462,  0.67712884,\n",
       "         0.70407448,  0.67278996,  0.6555438 ,  0.71389933,  0.67018313,\n",
       "         0.66436749,  0.6647686 ,  0.67419367,  0.66256266,  0.73094482,\n",
       "         0.42713623,  0.45601344,  0.44418154,  0.45120029,  0.39866576]),\n",
       " 'mean_test_score': array([-0.57996494, -0.58015545, -0.58014356, -0.58092444, -0.58552148,\n",
       "        -0.57972232, -0.58011521, -0.58023735, -0.58054646, -0.58577545,\n",
       "        -0.57955004, -0.57958109, -0.57926316, -0.58035249, -0.58560306,\n",
       "        -0.57952317, -0.5797472 , -0.57918695, -0.58037631, -0.58601495,\n",
       "        -0.6169064 , -0.61688349, -0.61728055, -0.61709977, -0.61791837]),\n",
       " 'mean_train_score': array([-0.46496805, -0.46887128, -0.47296511, -0.48826098, -0.52702341,\n",
       "        -0.46500611, -0.46828577, -0.47242929, -0.48828713, -0.52696422,\n",
       "        -0.46459737, -0.46808618, -0.47247929, -0.48849637, -0.52727463,\n",
       "        -0.4677711 , -0.47062464, -0.4740816 , -0.4907703 , -0.52871531,\n",
       "        -0.60516062, -0.60504875, -0.60553963, -0.60531462, -0.60634958]),\n",
       " 'param_reg_alpha': masked_array(data = [1e-05 1e-05 1e-05 1e-05 1e-05 0.01 0.01 0.01 0.01 0.01 0.1 0.1 0.1 0.1 0.1\n",
       "  1 1 1 1 1 100 100 100 100 100],\n",
       "              mask = [False False False False False False False False False False False False\n",
       "  False False False False False False False False False False False False\n",
       "  False],\n",
       "        fill_value = ?),\n",
       " 'param_reg_lambda': masked_array(data = [0.5 1 2 10 100 0.5 1 2 10 100 0.5 1 2 10 100 0.5 1 2 10 100 0.5 1 2 10 100],\n",
       "              mask = [False False False False False False False False False False False False\n",
       "  False False False False False False False False False False False False\n",
       "  False],\n",
       "        fill_value = ?),\n",
       " 'params': ({'reg_alpha': 1e-05, 'reg_lambda': 0.5},\n",
       "  {'reg_alpha': 1e-05, 'reg_lambda': 1},\n",
       "  {'reg_alpha': 1e-05, 'reg_lambda': 2},\n",
       "  {'reg_alpha': 1e-05, 'reg_lambda': 10},\n",
       "  {'reg_alpha': 1e-05, 'reg_lambda': 100},\n",
       "  {'reg_alpha': 0.01, 'reg_lambda': 0.5},\n",
       "  {'reg_alpha': 0.01, 'reg_lambda': 1},\n",
       "  {'reg_alpha': 0.01, 'reg_lambda': 2},\n",
       "  {'reg_alpha': 0.01, 'reg_lambda': 10},\n",
       "  {'reg_alpha': 0.01, 'reg_lambda': 100},\n",
       "  {'reg_alpha': 0.1, 'reg_lambda': 0.5},\n",
       "  {'reg_alpha': 0.1, 'reg_lambda': 1},\n",
       "  {'reg_alpha': 0.1, 'reg_lambda': 2},\n",
       "  {'reg_alpha': 0.1, 'reg_lambda': 10},\n",
       "  {'reg_alpha': 0.1, 'reg_lambda': 100},\n",
       "  {'reg_alpha': 1, 'reg_lambda': 0.5},\n",
       "  {'reg_alpha': 1, 'reg_lambda': 1},\n",
       "  {'reg_alpha': 1, 'reg_lambda': 2},\n",
       "  {'reg_alpha': 1, 'reg_lambda': 10},\n",
       "  {'reg_alpha': 1, 'reg_lambda': 100},\n",
       "  {'reg_alpha': 100, 'reg_lambda': 0.5},\n",
       "  {'reg_alpha': 100, 'reg_lambda': 1},\n",
       "  {'reg_alpha': 100, 'reg_lambda': 2},\n",
       "  {'reg_alpha': 100, 'reg_lambda': 10},\n",
       "  {'reg_alpha': 100, 'reg_lambda': 100}),\n",
       " 'rank_test_score': array([ 8, 11, 10, 16, 17,  6,  9, 12, 15, 19,  4,  5,  2, 13, 18,  3,  7,\n",
       "         1, 14, 20, 22, 21, 24, 23, 25]),\n",
       " 'split0_test_score': array([-0.57654623, -0.57705908, -0.57632878, -0.5777959 , -0.58239337,\n",
       "        -0.57682875, -0.577717  , -0.57700561, -0.57668218, -0.58261632,\n",
       "        -0.57543119, -0.575445  , -0.57643614, -0.57701261, -0.58254587,\n",
       "        -0.57579439, -0.57715612, -0.57472167, -0.5761559 , -0.58344947,\n",
       "        -0.61482175, -0.61477476, -0.61556886, -0.61546436, -0.61610479]),\n",
       " 'split0_train_score': array([-0.46517873, -0.46896649, -0.47330985, -0.48960554, -0.52792585,\n",
       "        -0.46508218, -0.46971639, -0.47261724, -0.49013273, -0.52805771,\n",
       "        -0.46393577, -0.46814452, -0.47286579, -0.49000693, -0.52823579,\n",
       "        -0.46866281, -0.47203823, -0.47518635, -0.49210371, -0.53035208,\n",
       "        -0.60581411, -0.60587063, -0.60634503, -0.60626245, -0.60698226]),\n",
       " 'split1_test_score': array([-0.57945749, -0.57952468, -0.58146936, -0.58140549, -0.58483721,\n",
       "        -0.57885526, -0.58030455, -0.57932377, -0.58134611, -0.58529777,\n",
       "        -0.57991873, -0.57962893, -0.57961766, -0.58029303, -0.58593632,\n",
       "        -0.58029916, -0.57978289, -0.57968153, -0.58016998, -0.58560725,\n",
       "        -0.6160542 , -0.61587715, -0.61650043, -0.61675457, -0.6172653 ]),\n",
       " 'split1_train_score': array([-0.46407199, -0.46728238, -0.47180309, -0.48644082, -0.52687212,\n",
       "        -0.46507931, -0.46779003, -0.47174188, -0.48758184, -0.52651824,\n",
       "        -0.46394277, -0.46677769, -0.47212787, -0.48627002, -0.52727697,\n",
       "        -0.46648149, -0.4691529 , -0.47324575, -0.48903433, -0.52864389,\n",
       "        -0.60511188, -0.60456515, -0.60542612, -0.60508364, -0.60609478]),\n",
       " 'split2_test_score': array([-0.58047777, -0.58071073, -0.58084189, -0.58192695, -0.58547586,\n",
       "        -0.58058096, -0.5803772 , -0.58164418, -0.5813184 , -0.58565948,\n",
       "        -0.5802324 , -0.58030461, -0.57972484, -0.58146824, -0.58513119,\n",
       "        -0.57983742, -0.58021933, -0.57993508, -0.58171162, -0.58562346,\n",
       "        -0.61756549, -0.61751503, -0.6180364 , -0.61745683, -0.6187154 ]),\n",
       " 'split2_train_score': array([-0.46716924, -0.47126336, -0.47559055, -0.49078668, -0.52728428,\n",
       "        -0.46737055, -0.46976957, -0.47403197, -0.48973848, -0.52731683,\n",
       "        -0.46810519, -0.47054178, -0.47476925, -0.49164548, -0.52790884,\n",
       "        -0.47069182, -0.47405475, -0.47657279, -0.49245448, -0.52940787,\n",
       "        -0.60531468, -0.60508428, -0.60551709, -0.60544002, -0.60676055]),\n",
       " 'split3_test_score': array([-0.58181178, -0.58228403, -0.58207694, -0.58339918, -0.58890379,\n",
       "        -0.58185791, -0.5814591 , -0.58303571, -0.58361216, -0.58929922,\n",
       "        -0.58202998, -0.58251263, -0.58104978, -0.58331209, -0.58889093,\n",
       "        -0.58234318, -0.58208885, -0.58200541, -0.5832541 , -0.58896785,\n",
       "        -0.61922289, -0.61948002, -0.61937313, -0.61914808, -0.61995889]),\n",
       " 'split3_train_score': array([-0.46447799, -0.46782762, -0.47150459, -0.48588312, -0.52556254,\n",
       "        -0.46385933, -0.46697135, -0.47158018, -0.48617909, -0.52591991,\n",
       "        -0.46258581, -0.46744909, -0.4696632 , -0.48577716, -0.52551189,\n",
       "        -0.46539483, -0.46902247, -0.47231524, -0.48918618, -0.52684602,\n",
       "        -0.60407749, -0.60426509, -0.60459825, -0.60436404, -0.60536418]),\n",
       " 'split4_test_score': array([-0.58153189, -0.58119906, -0.58000078, -0.58009443, -0.58599732,\n",
       "        -0.58048894, -0.5807184 , -0.58017746, -0.57977321, -0.58600453,\n",
       "        -0.58013808, -0.58001442, -0.57948743, -0.57967628, -0.58551096,\n",
       "        -0.57934166, -0.57948873, -0.5795912 , -0.58059   , -0.58642686,\n",
       "        -0.61686768, -0.61677048, -0.61692381, -0.61667487, -0.61754737]),\n",
       " 'split4_train_score': array([-0.46394227, -0.46901653, -0.47261747, -0.48858874, -0.52747228,\n",
       "        -0.46363919, -0.46718154, -0.47217517, -0.4878035 , -0.52700843,\n",
       "        -0.46441733, -0.46751779, -0.47297036, -0.48878226, -0.52743967,\n",
       "        -0.46762454, -0.46885486, -0.47308785, -0.49107281, -0.52832669,\n",
       "        -0.60548496, -0.60545857, -0.60581168, -0.60542293, -0.60654611]),\n",
       " 'std_fit_time': array([  11.99245996,   13.02375279,  534.83794932,   20.76109689,\n",
       "           9.45366363,    3.68509919,    3.3695563 ,   11.25601038,\n",
       "           6.15438372,    6.63583933,    8.13829348,    3.49910741,\n",
       "          25.37659675,    7.06470215,    2.13234388,    9.61265001,\n",
       "          21.51637521,    9.29538867,    8.09708711,   15.12908466,\n",
       "          16.14058192,   13.0903065 ,   16.67628642,    0.93665773,\n",
       "          18.88114927]),\n",
       " 'std_score_time': array([ 0.08379036,  0.12406952,  0.28582269,  0.04048567,  0.07885197,\n",
       "         0.09843467,  0.11173433,  0.20717413,  0.18582822,  0.03245806,\n",
       "         0.08379944,  0.02302217,  0.04130899,  0.03802747,  0.03571269,\n",
       "         0.06370103,  0.03486635,  0.05834326,  0.03141006,  0.06241384,\n",
       "         0.01622946,  0.03317835,  0.04185802,  0.02543678,  0.05472584]),\n",
       " 'std_test_score': array([ 0.00190129,  0.00178406,  0.00202769,  0.00188883,  0.00209395,\n",
       "         0.00173269,  0.00126698,  0.00205396,  0.00228761,  0.00213038,\n",
       "         0.0021938 ,  0.00229853,  0.00152144,  0.00207947,  0.00202484,\n",
       "         0.00212563,  0.00158043,  0.00240216,  0.00236501,  0.00177715,\n",
       "         0.00147477,  0.00158832,  0.00131274,  0.00120812,  0.0013155 ]),\n",
       " 'std_train_score': array([ 0.00118194,  0.00136865,  0.00145712,  0.00185805,  0.0008051 ,\n",
       "         0.00132554,  0.00121993,  0.00087886,  0.00146204,  0.0007227 ,\n",
       "         0.00185741,  0.00130188,  0.00165459,  0.00221951,  0.00094451,\n",
       "         0.00182521,  0.00207986,  0.00156414,  0.00143031,  0.00116697,\n",
       "         0.00058848,  0.00058184,  0.00056961,  0.00061364,  0.00057336])}"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "gsearch5_1.cv_results_"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Best: -0.579187 using {'reg_alpha': 1, 'reg_lambda': 2}\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAZEAAAEFCAYAAAAi1toCAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xl8XHW9//HXmX3JZGmbQtktwgdkFxHEFiqiCHLhlkWQ\ni3JZpYALqKgsFi6bgqAICopFC7jxu6LigqCyldJi2aSl8NUC5dICbZpmnX05vz/OSTOZZtLkNJM2\nmc/z8cijk7PN95O28873e875Hsu2bZRSSikvfFu6AUoppcYvDRGllFKeaYgopZTyTENEKaWUZxoi\nSimlPAts6QaMpba2Hk+XorW0xOjoSI12c7ZqWnP9qMe6teaRaW1N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n+JuuzvOlODXu7UcjROMSm02DRGlNu1qICoiy3A+hC81xryG85CjHpxHBMzHGX5KVz3KQFcBT4nI\n8zhPHFyJ01MYrpdxzpcsxRnmmmeMWYNznuRvODP1drvb/hNnuvtXgedxTrbvPIL3UqoqncVXKY9E\n5JM4T477o/tchheADxhj1m/hpik1ZjRElPJIRN4D3Ev/ServAIuA31TZ5RxjzLNj0TalxoqGiFJK\nKc/0nIhSSinPNESUUkp5piGilFLKMw0RpZRSnmmIKKWU8uz/A3SatjJ5fsE+AAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x21306d67668>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "# summarize results\n",
    "print(\"Best: %f using %s\" % (gsearch5_1.best_score_, gsearch5_1.best_params_))\n",
    "test_means = gsearch5_1.cv_results_[ 'mean_test_score' ]\n",
    "test_stds = gsearch5_1.cv_results_[ 'std_test_score' ]\n",
    "train_means = gsearch5_1.cv_results_[ 'mean_train_score' ]\n",
    "train_stds = gsearch5_1.cv_results_[ 'std_train_score' ]\n",
    "\n",
    "pd.DataFrame(gsearch5_1.cv_results_).to_csv('my_preds_reg_alpha_reg_lambda_1.csv')\n",
    "\n",
    "# plot results\n",
    "test_scores = np.array(test_means).reshape(len(reg_alpha), len(reg_lambda))\n",
    "train_scores = np.array(train_means).reshape(len(reg_alpha), len(reg_lambda))\n",
    "    \n",
    "for i, value in enumerate(reg_alpha):\n",
    "    pyplot.plot(reg_lambda, test_scores[i], label= 'reg_alpha:'   + str(value))\n",
    "    \n",
    "pyplot.legend()\n",
    "pyplot.xlabel( 'reg_lambda' )                                                                                                      \n",
    "pyplot.ylabel( '-Log Loss' )\n",
    "pyplot.savefig( 'reg_alpha_vs_reg_lambda1.png' )"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.5.2"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
